<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../static/css/admin.css" media="all">
    <style>
        .layui-form-label {
            width: 100px;
        }
    </style>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header" style="border-radius: 0;border-top: 4px solid #d2d2d2;">
            <div>简历管理>简历登记</div>
        </div>
        <div class="layui-form layui-card-body layuiadmin-card-header-auto" lay-filter="layuiadmin-form-useradmin" id="layuiadmin-form-useradmin">
            <div class="layui-form-item layui-input-inline layui-hide">
                <label class="layui-form-label">简历编号</label>
                <div class="layui-input-inline">
                    <input type="text" name="resume_id" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">应聘职位名称</label>
                <div class="layui-input-inline">
                    <input type="text" name="job_name" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">应聘职位编码</label>
                <div class="layui-input-inline">
                    <input type="text" name="job_id" lay-verify="required" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">应聘职位分类</label>
                <div class="layui-input-inline">
                    <input type="text" name="job_type" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-inline">
                    <input type="text" name="name" lay-verify="required" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-inline">
                    <select name="sex">
                        <option value="1" selected>男</option>
                        <option value="0">女</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">招聘类型</label>
                <div class="layui-input-inline">
                    <select name="recruit_type">
                        <option value="社会招聘">社会招聘</option>
                        <option value="校园招聘">校园招聘</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">EMAIL</label>
                <div class="layui-input-inline">
                    <input type="text" name="email" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">联系电话</label>
                <div class="layui-input-inline">
                    <input type="text" name="phone" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">户口所在地</label>
                <div class="layui-input-inline">
                    <input type="text" name="location" lay-verify="required" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item layui-input-inline"  style="width: 664px">
                <label class="layui-form-label">住址</label>
                <div class="layui-input-inline">
                    <input type="text" name="address" lay-verify="required" autocomplete="off" class="layui-input" style="width: 525px" >
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">政治面貌</label>
                <div class="layui-input-inline">
                    <input type="text" name="politic_outlook" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">身份证号</label>
                <div class="layui-input-inline">
                    <input type="text" name="identity" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">毕业院校</label>
                <div class="layui-input-inline">
                    <input type="text" name="graduate_school" lay-verify="required" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">学历</label>
                <div class="layui-input-inline">
                    <input type="text" name="degree" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">专业</label>
                <div class="layui-input-inline">
                    <input type="text" name="major" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">工作经验</label>
                <div class="layui-input-inline">
                    <input type="text" name="experience" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">薪资要求</label>
                <div class="layui-input-inline">
                    <input type="text" name="salary" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">是否在职</label>
                <div class="layui-input-inline">
                    <select name="is_work">
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">是否应届生</label>
                <div class="layui-input-inline">
                    <select name="is_graduate">
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">登记时间</label>
                <div class="layui-input-inline">
                    <input type="text" name="reg_time" lay-verify="required" autocomplete="off" class="layui-input" id="test1" placeholder="yyyy-MM-dd" readonly>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">个人履历</label>
                <div class="layui-input-block" style="width: 860px; margin-left: 130px">
                    <textarea name="resumes" placeholder="请输入内容" class="layui-textarea" style="height: 180px;" ></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">简历附件</label>
                <div class="layui-input-inline">
                    <input type="text" name="resume_url" lay-verify="required" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">是否推荐面试</label>
                <div class="layui-input-inline">
                    <select name="is_recom" id="is_recom" lay-filter="recommend">
                        <option value="1">是</option>
                        <option value="0">否</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">推荐人</label>
                <div class="layui-input-inline">
                    <input type="text" id="recommender" name="recommender" lay-verify="required" autocomplete="off" class="layui-input" readonly >
                </div>
            </div>
            <div class="layui-form-item layui-input-inline">
                <label class="layui-form-label">推荐时间</label>
                <div class="layui-input-inline">
                    <input type="text" id="recom_time" name="recom_time" lay-verify="required" autocomplete="off" class="layui-input" readonly>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">推荐面试意见</label>
                <div class="layui-input-block" style="width: 860px; margin-left: 130px">
                    <textarea name="recom_advice" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>

            <div class="layui-form-item layui-input-block layui-hide" style="margin-left: 420px">
                <button type="submit" class="layui-btn" lay-submit id="LAY-user-front-submit" lay-filter="LAY-user-front-submit" style="margin-left: 40px;margin-right: 30px">发布</button>
            </div>
        </div>
    </div>
</div>
<!--<script src="js/jquery-2.0.3.min.js"></script>-->
<script src="../../../static/layui/layui.js"></script>
<script type="text/javascript">
    // 日期格式转换函数
    function formatDate(str) {
        if (str != null) {
            var now = new Date(str);
            var year = now.getFullYear();  //取得4位数的年份
            var month = now.getMonth() + 1;  //取得日期中的月份，其中0表示1月，11表示12月
            var date = now.getDate();      //返回日期月份中的天数（1到31）
            return year + "-" + month + "-" + date;
        }
        return "";
    }
</script>
<script type="text/javascript">
    layui.use(['layer', 'table', 'form', 'element', 'util', 'laydate'], function () {
        var $ = layui.$
            , form = layui.form
            , layer = layui.layer
            , table = layui.table
            , element = layui.element
            , util = layui.util
            , laydate = layui.laydate;

        //获取登录信息
        var userInfo = sessionStorage.getItem("user");
        var user = JSON.parse(userInfo);

        form.on('select(recommend)',function (data){
            if (data.value === "1"){
                var currentDate = new Date();
                var year = currentDate.getFullYear();  //取得4位数的年份
                var month = currentDate.getMonth() + 1;  //取得日期中的月份，其中0表示1月，11表示12月
                var date = currentDate.getDate();      //返回日期月份中的天数（1到31）
                document.getElementById("recommender").value = user.login_name;
                document.getElementById("recom_time").value = year + "-" + month + "-" + date;

/*                $.ajax({
                    url:"/recruit/resume/changeStatus", //请求后端接口地址
                    type:"post", //请求方式get | post
                    data:{status:'1',resume_id:data.resume_id}, //提交json字符串对象参数
                    dataType:"json", //后端返回参数类型
                    success:function (res){ //请求成功后回调函数res = JSONObject.toJSONString(resultMap)
                        if(res.code == 0){//成功
                            console.log(0)
                        }
                        if(res.code == -1){//系统出问题
                            console.log(-1)
                        }
                    }
                })*/
            }
        })

        laydate.render({
            elem: '#test1'
        });
    });
</script>
</body>
</html>